<?PHP

	include("../../includes/configAjax.php");

	$set = $_GET['set'];
	$user = $_SESSION['uid'];
	
	if($set=='unhide'){
		$setVal = 0;
	} else {
		$setVal = 1;
	}
	
	if($users->auth($db, 2)){
		$outcome = $db->query("UPDATE ".$prefix."users SET hide_deleted=".$setVal." WHERE userid=".$db->prep($user));
	} else {
		$outcome = $db->query("UPDATE ".$prefix."users SET hide_deleted=0 WHERE userid=".$db->prep($user));
	}
	
	if($outcome){
		echo "ok";
	} else {
		echo "None";
	}
?>